package com.dongbao.action;

import com.dongbao.data.Datacenter;
import com.dongbao.dialog.InputDialog;
import com.dongbao.util.MtqqUtil;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;

public class UpClientIpAction extends AnAction {

    @Override
    public void actionPerformed(AnActionEvent e) {
        /* 打开弹窗输入新的ip */
        /* 打开弹窗输入多语言URL */
        InputDialog inputDialog = new InputDialog("输入局域网IP地址["+Datacenter.clientIp+"]");
        if (inputDialog.showAndGet()) {
            // 点击确定后执行逻辑
            // 获取输入内容
            Datacenter.clientIp = inputDialog.getInput().getText();
            /* 刷新当前客户端的订阅 */
            MtqqUtil.referSub();
        }

    }
}
